package com.zlsy.thread.controller;

import com.zlsy.thread.dto.SynchDTO;
import com.zlsy.thread.service.SynchronizedTestService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhouliang
 * @date 2020/03/02
 **/
@Slf4j
@RestController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class SynchronizedTestController {

    private final SynchronizedTestService synchronizedTestService;

    @RequestMapping("/test")
    public void testSynch(@RequestBody SynchDTO synchDTO) {
        synchronizedTestService.query(synchDTO);
    }
}
